import { UserInfoVO, UserVO, UserQuery } from '@/api/system/types/user.type'

/**
 * 查询用户个人信息
 */
export const getUserProfile = (): Promise<ApiResponse<UserInfoVO>> => {
  return uni.$uv.http.request({
    url: '/system/user/profile',
    method: 'get'
  })
}

/**
 * 查询用户列表
 * @param query
 */
export const listUser = (query: UserQuery): Promise<ApiResponse<UserVO[]>> => {
  return uni.$uv.http.request({
    url: '/system/user/list',
    method: 'get',
    params: query
  })
}
